<template>
  <view>
    <uni-list>
      <uni-list-item v-for="msg in msgList" :key="msg.type"
                     link :to="msg.url"
      >
        <template v-slot:header>
          <image :src="msg.image" class="cover">
          </image>
        </template>
        <template v-slot:body>
          <div class="content">
            <uni-title type="h1" align="left" :title="msg.title"></uni-title>
            <uni-row :gutter="30">
              <uni-badge style="margin-left: 10px" v-for="(note,index) in msg.note" absolute="rightTop" :key="index" :text="note.badge">
                <uni-tag circle type="primary" :text="note.name"></uni-tag>
              </uni-badge>
            </uni-row>
          </div>
        </template>
        <template v-slot:footer>
        </template>
      </uni-list-item>
    </uni-list>
  </view>
</template>

<script setup lang="ts">

import UniList from "../../uni_modules/uni-list/components/uni-list/uni-list.vue";
import UniListChat from "../../uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue";
import {reactive} from "vue";

import audit from '../../static/audit.png'
import UniListItem from "../../uni_modules/uni-list/components/uni-list-item/uni-list-item.vue";
import UniTitle from "../../uni_modules/uni-title/components/uni-title/uni-title.vue";
import UniRow from "../../uni_modules/uni-row/components/uni-row/uni-row.vue";
import UniCol from "../../uni_modules/uni-row/components/uni-col/uni-col.vue";
import UniTag from "../../uni_modules/uni-tag/components/uni-tag/uni-tag.vue";
import UniBadge from "../../uni_modules/uni-badge/components/uni-badge/uni-badge.vue";
import {MsgIndex, msgService} from "../../pagesVM/msg";

const {msgList,adapetMsg} = MsgIndex()
const {refreshMsg} = msgService()
adapetMsg()


</script>

<style>
.cover {
  border-radius: 50%;
  height: 80px;
  width: 80px;
  background-color: rgba(108, 108, 108, 0.78);
}

.content {
  padding: 10px;
  width: 80%;
}

</style>
